/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.fgv.erp.modelo;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author adao
 */
@Entity
@Table(name = "Imovel")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Imovel.findAll", query = "SELECT i FROM Imovel i"),
    @NamedQuery(name = "Imovel.findByImovel", query = "SELECT i FROM Imovel i WHERE i.imovel = :imovel"),
    @NamedQuery(name = "Imovel.findByAutoriza", query = "SELECT i FROM Imovel i WHERE i.autoriza = :autoriza"),
    @NamedQuery(name = "Imovel.findByDataInsercao", query = "SELECT i FROM Imovel i WHERE i.dataInsercao = :dataInsercao"),
    @NamedQuery(name = "Imovel.findByDormitorio", query = "SELECT i FROM Imovel i WHERE i.dormitorio = :dormitorio"),
    @NamedQuery(name = "Imovel.findByMapLatitude", query = "SELECT i FROM Imovel i WHERE i.mapLatitude = :mapLatitude"),
    @NamedQuery(name = "Imovel.findByMapLongitude", query = "SELECT i FROM Imovel i WHERE i.mapLongitude = :mapLongitude"),
    @NamedQuery(name = "Imovel.findByNaoAutorizado", query = "SELECT i FROM Imovel i WHERE i.naoAutorizado = :naoAutorizado"),
    @NamedQuery(name = "Imovel.findByPalavrasChaves", query = "SELECT i FROM Imovel i WHERE i.palavrasChaves = :palavrasChaves"),
    @NamedQuery(name = "Imovel.findByTitulo", query = "SELECT i FROM Imovel i WHERE i.titulo = :titulo"),
    @NamedQuery(name = "Imovel.findByUltimaAtualizacao", query = "SELECT i FROM Imovel i WHERE i.ultimaAtualizacao = :ultimaAtualizacao"),
    @NamedQuery(name = "Imovel.findByVagaGarragem", query = "SELECT i FROM Imovel i WHERE i.vagaGarragem = :vagaGarragem"),
    @NamedQuery(name = "Imovel.findByValor", query = "SELECT i FROM Imovel i WHERE i.valor = :valor"),
    @NamedQuery(name = "Imovel.findByValorFinal", query = "SELECT i FROM Imovel i WHERE i.valorFinal = :valorFinal"),
    @NamedQuery(name = "Imovel.findByVideo", query = "SELECT i FROM Imovel i WHERE i.video = :video"),
    @NamedQuery(name = "Imovel.findByClienteCliente", query = "SELECT i FROM Imovel i WHERE i.clienteCliente = :clienteCliente"),
    @NamedQuery(name = "Imovel.findByLocallocalFisico", query = "SELECT i FROM Imovel i WHERE i.locallocalFisico = :locallocalFisico"),
    @NamedQuery(name = "Imovel.findBySituacaoId", query = "SELECT i FROM Imovel i WHERE i.situacaoId = :situacaoId"),
    @NamedQuery(name = "Imovel.findByTipoImoveltipoImovel", query = "SELECT i FROM Imovel i WHERE i.tipoImoveltipoImovel = :tipoImoveltipoImovel")})
public class Imovel implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "imovel")
    private Long imovel;
    @Column(name = "autoriza")
    private Boolean autoriza;
    @Lob
    @Size(max = 65535)
    @Column(name = "conteudo")
    private String conteudo;
    @Column(name = "dataInsercao")
    @Temporal(TemporalType.DATE)
    private Date dataInsercao;
    @Column(name = "dormitorio")
    private BigInteger dormitorio;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "mapLatitude")
    private Double mapLatitude;
    @Column(name = "mapLongitude")
    private Double mapLongitude;
    @Column(name = "naoAutorizado")
    private Boolean naoAutorizado;
    @Size(max = 255)
    @Column(name = "palavrasChaves")
    private String palavrasChaves;
    @Size(max = 255)
    @Column(name = "titulo")
    private String titulo;
    @Column(name = "ultimaAtualizacao")
    @Temporal(TemporalType.DATE)
    private Date ultimaAtualizacao;
    @Column(name = "vagaGarragem")
    private BigInteger vagaGarragem;
    @Column(name = "valor")
    private Double valor;
    @Column(name = "valorFinal")
    private Double valorFinal;
    @Size(max = 255)
    @Column(name = "video")
    private String video;
    @Column(name = "cliente_cliente")
    private BigInteger clienteCliente;
    @Column(name = "local_localFisico")
    private BigInteger locallocalFisico;
    @Column(name = "situacao_id")
    private BigInteger situacaoId;
    @Column(name = "tipoImovel_tipoImovel")
    private BigInteger tipoImoveltipoImovel;

    public Imovel() {
    }

    public Imovel(Long imovel) {
        this.imovel = imovel;
    }

    public Long getImovel() {
        return imovel;
    }

    public void setImovel(Long imovel) {
        this.imovel = imovel;
    }

    public Boolean getAutoriza() {
        return autoriza;
    }

    public void setAutoriza(Boolean autoriza) {
        this.autoriza = autoriza;
    }

    public String getConteudo() {
        return conteudo;
    }

    public void setConteudo(String conteudo) {
        this.conteudo = conteudo;
    }

    public Date getDataInsercao() {
        return dataInsercao;
    }

    public void setDataInsercao(Date dataInsercao) {
        this.dataInsercao = dataInsercao;
    }

    public BigInteger getDormitorio() {
        return dormitorio;
    }

    public void setDormitorio(BigInteger dormitorio) {
        this.dormitorio = dormitorio;
    }

    public Double getMapLatitude() {
        return mapLatitude;
    }

    public void setMapLatitude(Double mapLatitude) {
        this.mapLatitude = mapLatitude;
    }

    public Double getMapLongitude() {
        return mapLongitude;
    }

    public void setMapLongitude(Double mapLongitude) {
        this.mapLongitude = mapLongitude;
    }

    public Boolean getNaoAutorizado() {
        return naoAutorizado;
    }

    public void setNaoAutorizado(Boolean naoAutorizado) {
        this.naoAutorizado = naoAutorizado;
    }

    public String getPalavrasChaves() {
        return palavrasChaves;
    }

    public void setPalavrasChaves(String palavrasChaves) {
        this.palavrasChaves = palavrasChaves;
    }

    public String getTitulo() {
        return titulo;
    }

    public void setTitulo(String titulo) {
        this.titulo = titulo;
    }

    public Date getUltimaAtualizacao() {
        return ultimaAtualizacao;
    }

    public void setUltimaAtualizacao(Date ultimaAtualizacao) {
        this.ultimaAtualizacao = ultimaAtualizacao;
    }

    public BigInteger getVagaGarragem() {
        return vagaGarragem;
    }

    public void setVagaGarragem(BigInteger vagaGarragem) {
        this.vagaGarragem = vagaGarragem;
    }

    public Double getValor() {
        return valor;
    }

    public void setValor(Double valor) {
        this.valor = valor;
    }

    public Double getValorFinal() {
        return valorFinal;
    }

    public void setValorFinal(Double valorFinal) {
        this.valorFinal = valorFinal;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public BigInteger getClienteCliente() {
        return clienteCliente;
    }

    public void setClienteCliente(BigInteger clienteCliente) {
        this.clienteCliente = clienteCliente;
    }

    public BigInteger getLocallocalFisico() {
        return locallocalFisico;
    }

    public void setLocallocalFisico(BigInteger locallocalFisico) {
        this.locallocalFisico = locallocalFisico;
    }

    public BigInteger getSituacaoId() {
        return situacaoId;
    }

    public void setSituacaoId(BigInteger situacaoId) {
        this.situacaoId = situacaoId;
    }

    public BigInteger getTipoImoveltipoImovel() {
        return tipoImoveltipoImovel;
    }

    public void setTipoImoveltipoImovel(BigInteger tipoImoveltipoImovel) {
        this.tipoImoveltipoImovel = tipoImoveltipoImovel;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (imovel != null ? imovel.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Imovel)) {
            return false;
        }
        Imovel other = (Imovel) object;
        if ((this.imovel == null && other.imovel != null) || (this.imovel != null && !this.imovel.equals(other.imovel))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.fgv.erp.modelo.Imovel[ imovel=" + imovel + " ]";
    }
    
}
